<div class="zi_xun chantu layui-hide">
    <div class="men">
        <div class="xiaotit">巡检/整改</div>
        <div style="width: 900px;margin: 0 auto">
            <div class="float-l" style="width: 600px">
                <div class="chart" id="zi_chart_xunzheng" style="height: 300px"></div>
            </div>
            <div class="float-l" style="padding-top: 10px;width: 300px;">
                <div class="float-l fangding" style="padding-left: 20px;padding-top: 60px;">
                    <span class="fanglan2" style="top: 20px"></span><span style="font-size: 16px;" class="fw700">下达整改通知：
                        <span id="zi_xun_zheng_all" style="font-size: 26px">0</span></span>
                </div>
                <div class="clear" style="padding-top: 20px"></div>
                <div class="float-l fangding" style="padding-left: 20px;padding-top: 5px;">
                    <span class="fanglan tuclr1"></span><span style="margin-left: 20px">已整改：<span id="zi_xun_zheng_um">0</span></span>
                </div><div class="clear"></div>
                <div class="float-l fangding" style="padding-left: 20px;padding-top: 5px;">
                    <span class="fanglan tuclr2"></span><span style="margin-left: 20px">待整改：<span id="zi_xun_zheng_no">0</span></span>
                </div><div class="clear"></div>
                <div class="float-l fangding" style="padding-left: 20px;padding-top: 5px;">
                    <span class="fanglan tuclr3"></span><span style="margin-left: 20px">逾期未整改：<span id="zi_xun_zheng_yu">0</span></span>
                </div>
            </div>
        </div>

        <div class="clear"></div>
    </div>


</div>
<script>

    function func_zi_xun() {
        layui.use(['laytp', 'form', 'element'], function() {
            var form = layui.form, layer = layui.layer, element = layui.element;

            facade.ajax({url: ask_engin_cha_zi_xun,data:{enginid:param_enginid}}).done(function(res){
                if (res.code === 2000) {
                    var data = res.data;

                    zi_chart_xunzheng('zi_chart_xunzheng', data);
                    $("#zi_xun_zheng_all").html(parseFormatNum(data.zheng_all)).addClass('colorlan').click(function () {
                        openNavPage('查看项目整改通知信息','engin_zheng/index.php?enginid='+data.id);
                    });
                    $("#zi_xun_zheng_um").html(parseFormatNum(data.zheng_um)).addClass('colorlan').click(function () {
                        openNavPage('查看项目整改通知信息','engin_zheng/index.php?enginid='+data.id+'&zhengtype=um');
                    });
                    $("#zi_xun_zheng_no").html(parseFormatNum(data.zheng_no)).addClass('colorlan').click(function () {
                        openNavPage('查看项目整改通知信息','engin_zheng/index.php?enginid='+data.id+'&zhengtype=no');
                    });
                    $("#zi_xun_zheng_yu").html(parseFormatNum(data.zheng_yu)).addClass('colorlan').click(function () {
                        openNavPage('查看项目整改通知信息','engin_zheng/index.php?enginid='+data.id+'&zhengtype=yu');
                    });
                }
            });
        });
    }

    function zi_chart_xunzheng(chat_id, data) {
        var mychat = echarts.init(document.getElementById(chat_id), 'dark');
        mychat.clear();
        option = {
            color: [colors[1], colors[2], colors[3]],
            backgroundColor: '#FFFFFF',
            tooltip: {
                trigger: 'item'
            },
            series: [
                {
                    name: '整改通知',
                    type: 'pie',
                    radius: '80%',
                    data: [
                        { value: data.zheng_um, name: '已整改' },
                        { value: data.zheng_no, name: '待整改' },
                        { value: data.zheng_yu, name: '逾期未整改' },
                    ],
                    emphasis: {
                        itemStyle: {
                            shadowBlur: 10,
                            shadowOffsetX: 0,
                            shadowColor: 'rgba(0, 0, 0, 0.5)'
                        }
                    }
                }
            ]
        };
        mychat.setOption(option);
    }

</script>

